{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "h=float(input('你的身高'))\n",
    "m=float(input('你的体重'))\n",
    "\n",
    "def BMI(h,m):\n",
    "    x=m/((h)**2)\n",
    "    if x<18.5:\n",
    "        return('过轻')\n",
    "    elif 18.5<x<=25:\n",
    "        return('正常')\n",
    "    elif 25<x<=28:\n",
    "        return('过重')\n",
    "    elif 28<x<=32:\n",
    "        return('肥胖')\n",
    "    else:\n",
    "        return('严重肥胖')\n",
    "\n",
    "y=BMI(h,m)\n",
    "print(y)\n",
    "\n",
    "input(' ')\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
